package com.example.roadeyeserver.controller;

import com.example.roadeyeserver.entity.request.StationRoadAreaInfoRequest;
import com.example.roadeyeserver.entity.vo.StationRoadAreaInfoVO;
import com.example.roadeyeserver.result.Result;
import com.example.roadeyeserver.service.StationRoadAreaInfoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("stationRoadAreaInfo")
public class StationRoadAreaInfoController {

    @Resource
    private StationRoadAreaInfoService stationRoadAreaInfoService;

    @PostMapping("getAllRoad")
    public Result<List<StationRoadAreaInfoVO>> getAllRoad() {
        return stationRoadAreaInfoService.getAllRoad();
    }

    @PostMapping("getAllArea")
    public Result<List<StationRoadAreaInfoVO>> getAllArea() {
        return stationRoadAreaInfoService.getAllArea();
    }

    @PostMapping("getStationInStartEnd")
    public Result<List<StationRoadAreaInfoVO>> getStationInStartEnd(@RequestBody StationRoadAreaInfoRequest request) {
        return stationRoadAreaInfoService.getStationInStartEnd(request);
    }

}
